﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="YunCMS.Web.Admin.User.UserList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="yuncms" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/site.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
    <script src="../../Scripts/init.js" type="text/javascript"></script>
    <style type="text/css">
        .tr-state-hover
        {
            background: none repeat scroll 0 0 #eee;
        }
        .innerBtn
        {
            border: 1px solid transparent;
            display: block;
            padding: 4px;
            vertical-align: middle;
            float: left;
        }
        
        .search-box, .filter-box
        {
            float: left;
            margin-left: 10px;
            padding: 3px;
        }
        
        .filter-box > span
        {
            margin-left: 10px;
        }
        
        .right-box
        {
            float: right;
            padding: 3px;
        }
        
        .data_grid table
        {
            background: none repeat scroll 0 0 #ddd;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="tools-bar">
            <div class="search-box">
                用户：
                <asp:TextBox ID="keywordsTB" runat="server"></asp:TextBox>
                <span>
                    <asp:LinkButton ID="searchBT" runat="server" Text="搜 索" OnClick="searchBT_Click"></asp:LinkButton></span>
            </div>
            <div class="right-box">
                <asp:HyperLink ID="addBT" NavigateUrl="~/Admin/User/EditUser.aspx" runat="server">新 增</asp:HyperLink>
            </div>
            <div style="clear: both">
            </div>
        </div>
        <div class="data_grid ui-widget-content">
            <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
                <asp:Repeater ID="DataListRP" runat="server">
                    <HeaderTemplate>
                        <thead class="ui-state-default">
                            <tr>
                                <th scope="col" width="23" height="25">
                                    <input id="checkAll" type="checkbox" />
                                </th>
                                                                <th scope="col" width="40">
                                    <span class="line">编号</span>
                                </th>
                                <th scope="col" width="100">
                                    <span class="line">用户名</span>
                                </th>
                                <th scope="col" width="100">
                                    <span class="line">角色</span>
                                </th>
                                <th scope="col">
                                    <span class="line">姓名</span>
                                </th>
                                <th scope="col" width="100">
                                    <span class="line">联系电话</span>
                                </th>
                                <th scope="col" width="130">
                                    <span class="line">邮箱</span>
                                </th>
                                <th scope="col" width="160">
                                    <span class="line">添加时间</span>
                                </th>
                                <th scope="col" width="25">
                                    <span class="line">状态</span>
                                </th>
                                <th scope="col" width="25">
                                    <span class="line">修改</span>
                                </th>
                                <th scope="col" width="25">
                                    <span class="line">删除</span>
                                </th>
                            </tr>
                        </thead>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tbody class="ui-widget-content">
                            <tr>
                                <td height="25">
                                    <asp:CheckBox ID="idCHB" runat="server" />
                                </td>
                                <td>
                                    <asp:Label ID="idLabel" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                                </td>
                                <td>
                                    <a href='EditUser.aspx?id=<%#Eval("ID") %>&action=edit' title='<%#Eval("UserAccount") %>'>
                                        <%#Eval("UserAccount")%>
                                    </a>
                                </td>
                                <td>
                                    <asp:Label ID="cidLabel" runat="server" Text='<%#Eval("Role") %>'></asp:Label>
                                </td>
                                <td title='<%#Eval("Name") %>'>
                                    <%#Eval("Name")%>
                                </td>
                                <td title='<%#Eval("Telephone") %>'>
                                    <%#Eval("Telephone")%>
                                </td>
                                <td title='<%#Eval("Email") %>'>
                                    <%#Eval("Email")%>
                                </td>
                                <td title='<%#Eval("UpdateTime") %>'>
                                    <%#string.Format("{0:g}", Eval("UpdateTime"))%>
                                </td>
                                <td align="center">
                                    <a class="innerBtn ui-corner-all" href='?action=active&id=<%#Eval("ID") %>&val=<%#Eval("Deactive") %>'>
                                        <span class="ui-icon 
                                    <%#Eval("Deactive").ToString().Trim().ToLower() == "true" ? "ui-icon-check" : "ui-icon-closethick"%>">
                                        </span></a>
                                </td>
                                <td align="center">
                                    <a class="innerBtn ui-corner-all" href='EditUser.aspx?id=<%#Eval("ID") %>&action=edit'>
                                        <span class="ui-icon ui-icon-pencil"></span></a>
                                </td>
                                <td align="center">
                                    <a class="innerBtn ui-corner-all" href='?action=delete&id=<%#Eval("ID") %>' onclick="return window.confirm('确定删除 [<%#Eval("UserAccount") %>] 吗?');">
                                        <span class="ui-icon ui-icon-trash"></span></a>
                                </td>
                            </tr>
                        </tbody>
                    </ItemTemplate>
                    <FooterTemplate>
                        <%#DataListRP.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"11\">暂无记录</td></tr>" : ""%>
                    </FooterTemplate>
                </asp:Repeater>
            </table>
            <yuncms:AspNetPager CssClass="pager ui-state-default" ID="AspNetPager1" PageSize="10"
                runat="server" OnPageChanged="AspNetPager1_PageChanged">
            </yuncms:AspNetPager>
        </div>
        <div class="footer_bar">
            <asp:LinkButton ID="deleteAllBT" runat="server" OnClick="deleteAllBT_Click" OnClientClick="return window.confirm('确定删除选中的条目吗?');">删除</asp:LinkButton>
            <asp:LinkButton ID="activeAllBT" runat="server" OnClick="activeAllBT_Click">审核</asp:LinkButton>
        </div>
    </div>
    </form>
</body>
</html>
